package Thread;

/**
 * @program: javaLearn
 * @description:
 * @author: renhai
 * @Date ：2021/12/21 22:32
 **/
public class MyThread extends Thread {

    @Override
    public void run() {
        for (int i = 0; i < 30; i++) {

            if (i % 5 == 1) {
                try {
                    new MyThread2().join();
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
            System.out.println("A");
        }

    }
}
